home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / biz / dopus / ImageFXGER.lha / ImageFX.dopus5 next >
Text File  |  1997-09-10  |  3KB  |  103 lines

  1. /*
  2.  $VER: ImageFX.dopus5 1.0 (30.8.97) German version
  3.  Written by Tommy Jensen
  4.  and translated in german by chavez@koeln.netsurf.de
  5.  Send images to ImageFX from DirectoryOpus
  6.  Call as:
  7.  <AREXX>DOpus5:ARexx/ImageFX.dopus5
  8. */
  9.  
  10. /* Change this to the path where ImageFX is located (Don't remove the brackets) */
  11. ImageFX = 'HD1:Progs/grafik/ImageFX2/ImageFX'
  12.  
  13. options results
  14.  
  15. lf='0a'x /* Thanks to Edmund Vermeulen for that sneaky code :) */
  16.  
  17. if Show("P","DOPUS.1") then
  18.  address "DOPUS.1"
  19. Else Do
  20.  exit
  21.  end
  22.  
  23. dopus version
  24. If ( result='RESULT' | translate(result,'.',' ') < 5.1218 ) then do
  25.     dopus request '"Dieses script benötigt DOpus v5.5 oder höher." OK'
  26.  exit
  27.  end
  28.  
  29. lister query source
  30. slist=result
  31.  
  32. lister query slist numselfiles
  33. if result=0 then do
  34.  lister request slist '"Keine Dateien angewählt."' 'OK'
  35.  exit
  36.  end
  37.  
  38. lister query slist firstsel
  39. pic = Strip(result,"B",'"')
  40.  
  41. lister query slist path
  42. picpath=result
  43.  
  44. lister set slist busy on
  45. lister set slist newprogress name info title
  46. lister set slist newprogress title 'ImageFX.dopus5 by Tommy Jensen 97'
  47. lister set slist newprogress info 'Checking filetype'
  48. dopus getfiletype picpath''pic'' id
  49. picftype=result
  50. lister set slist newprogress info ' '
  51. lister set slist newprogress name pic'  ('picftype')'
  52.  
  53. lister set slist newprogress info 'Pfüfe, ob ImageFX geladen ist...'
  54. if Show("P","IMAGEFX.1") then call CHECKIFX
  55. Else Do
  56.  dopus front
  57.  lister request slist '"ImageFX scheint nicht geladen zu sein.'lf'ImageFX laden?"' '_Ja|_Nein'
  58.  
  59. if rc=1 then
  60.  call LOADIFX
  61. else do
  62.  lister set slist newprogress info 'Abgebrochen...'
  63.  call EXIT
  64.  
  65. CHECKIFX:
  66.          address "IMAGEFX.1"
  67.          options failat 3000
  68.          GETMAIN
  69.          If rc>0 then
  70.           call SENDIFX
  71.          Else Do
  72.           parse var result name .
  73.           address "DOPUS.1"
  74.           dopus front
  75.           lister request slist '"Der ImageFX Hauptpuffer ist nicht leer'lf'Projekt 'name lf'wird verworfen"' '_Fortfahren|_Abbrechen'
  76.          If rc=1 then
  77.           call SENDIFX
  78.          Else Do
  79.           lister set slist newprogress info 'Breche ab...'
  80.           call EXIT
  81.  
  82. LOADIFX:
  83.         lister set slist newprogress info 'Fahre ImageFX hoch...'
  84.         address command "RUN >NIL: "ImageFX
  85.         address command "WaitForPort IMAGEFX.1"
  86.         address command "Wait 1" /* This is needed for some strange reason */
  87.         lister set slist newprogress info 'ImageFX geladen...'
  88.  
  89. SENDIFX:
  90.         options failat 2
  91.         address "DOPUS.1"
  92.         lister set slist newprogress info 'Lade 'picftype' Datei...'
  93.         address "IMAGEFX.1"
  94.         LOADBUFFER FILE picpath''pic'' FORCE  /* Load picture */
  95.         SCREENTOFRONT  /* Bring IFX screen to front */
  96.         address "DOPUS.1"
  97.         lister select slist pic off
  98.  
  99. EXIT:
  100.      lister refresh slist
  101.      lister set slist busy off
  102.      exit
  103.